package com.glodon.paas.databag.sso;

import com.glodon.paas.account.sdk.sso.web.AuthenticatedSessionClientListener;
import org.springframework.stereotype.Component;

import javax.ws.rs.DELETE;
import javax.ws.rs.Path;
import javax.ws.rs.QueryParam;

/**
 * @author Don Li
 */
@Component
@Path("/sso/signout")
public class SingleSignOutService {
    @DELETE
    public void signout(@QueryParam("user_id") String userId) {
        AuthenticatedSessionClientListener.invalidateUserSessions(userId);
    }
}
